/**
 * User: rmikhaylenko mirusnet@gmail.com
 * Date: 14/05/13
 * Time: 14:27
 */

public class ParseOptions {

    public static StoreOptions parseOption(String argument, int argscount) {
        for (StoreOptions option : StoreOptions.values()) {
            if ((option.getLongOption().equals(argument) || option.getShortOption().equals(argument)) && option.getOptionCount() == argscount) {
                return option;
            }
        }
        return StoreOptions.SHOWHELP;
    }
}
